import 'package:flutter/material.dart';
import 'package:untitled/pages/home/tab_index/index_navigator_item.dart';
import 'package:untitled/widgets/common_image.dart';

class IndexNavigator extends StatelessWidget {
  const IndexNavigator({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(top:6.0,bottom: 6.0),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: indexNavigatorItemList.map((item) => InkWell(//可点击组件
          onTap: (){
            item.onTap(context);
          },
          child: Column(
            children: [
              CommonImage(src:item.imageUri,width:47.5),
              Text(item.title,style: TextStyle(
                fontSize: 14.0,
                fontWeight: FontWeight.bold
              ),)
            ],
          ),
        )).toList(),
      )

    );
  }
}
